package com.zx.system.block.param;

import com.zx.validation.annotation.ParameterValidation;
import com.zx.validation.enums.ValidateRulesEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * description: 用户登录参数 <br>
 * create: 2024-08-23 18:12
 * </p>
 *
 * @author zhou  xun
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class LoginParam implements Serializable {
    /**
     * 用户名
     */
    @ParameterValidation(index = 0, desc = "用户名", rules = {ValidateRulesEnum.NOT_NULL})
    private String username;

    /**
     * 用户密码
     */
    @ParameterValidation(index = 0, desc = "用户密码", rules = {ValidateRulesEnum.NOT_NULL})
    private String password;

    /**
     * 验证码
     */
    @ParameterValidation(index = 0, desc = "验证码", rules = {ValidateRulesEnum.NULL_LENGTH}, length = "5")
    private String captcha;

    /**
     * uuid
     */
    @ParameterValidation(index = 0, desc = "唯一uuid", rules = {ValidateRulesEnum.NOT_NULL, ValidateRulesEnum.LENGTH}, length = "1~32")
    private String uuid;
}
